class {
  onMount() {
    this.emit("custom-event", { hello: "world" });
  }
}

<div/>